package com.middle.common.util;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;

public class ParamUtil {
	
	/**
	 * 字符串集合中是否包含空值
	 * @param collections
	 * @return
	 */
	public static boolean hasEmptyInCollection(Collection<String> collections) {
		for(String str : collections) {
			if(str == null || str.trim().length() == 0) {
				return false;
			}
		}
		return false;
	}
	
	public static boolean hasEmptyInCollection(String... collections) {
		List<String> strs = new ArrayList<>();
		Collections.addAll(strs, collections);
		return hasEmptyInCollection(strs);
	}
	
	public static void main(String[] args) {
		hasEmptyInCollection("",null);
	}

}
